package org.cadad;

import java.util.ArrayList;
import java.util.List;

import org.cadad.models.Book;

public class BookInstance {

	private static BookInstance	instance	= null;
	private Book				currentBook;
	private List<Book>			listBook;

	protected BookInstance() {
		currentBook = new Book();
		listBook = new ArrayList<Book>();
	}

	public static BookInstance getInstance() {
		if (instance == null) {
			instance = new BookInstance();
		}
		return instance;
	}

	public void setBook(Book book) {
		this.currentBook = book;
	}

	public Book getBook() {
		return currentBook;
	}

	public void addBook(Book book) {
		this.listBook.add(book);
	}

	public List<Book> getListBook() {
		return listBook;
	}

}
